<?php
class UserView{
	protected static $_instance;

	private function __construct(){}
	private function __clone(){}
	public static function inst(){
	  if( null===self::$_instance ){
	    self::$_instance=new self();
		}
		return self::$_instance;
	}

	public static function error($msg){
	  return $msg;
	}

	public function getProfile($data){
		if(!empty($data['u_createtime'])) $data['u_createtime']=date('d.m.Y H:i:s', $data['u_createtime']);
		if(!empty($data['u_bdate'])) $data['u_bdate']= date('d.m.Y', strtotime($data['u_bdate']));
		return $data;
	}
	public function getUserByToken($data){
	  return $this->getProfile($data);
	}
	
}
?>